<template>
  <div class="mynav">
    <van-nav-bar  right-text="按钮" left-arrow @click-left="leftArrow">
        <template #left>
            <van-icon class="iconfont" ></van-icon>
        </template>
      <template #title>
        <div>
          {{ title }}
        </div>
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '标题',

    },
    left: ''
  },
  methods:{
      leftClick () {
      // 触发父组件的方法
      this.$emit('leftArrow')
    }
  }
}
</script>

<style></style>
